<!--
 * @Description: 
 * @version: 1.0
 * @Company: 
 * @Author: GeYang
 * @Date: 2019-10-26 13:00:49
 * @LastEditors: 
 * @LastEditTime: 2019-12-10 09:44:11
 -->
<template>
  <div>
    <!-- <h1>hello world</h1> -->
    <h1 class="titleClass">MBTI调查问卷II</h1>

    <el-form label-width="8rem" ref="MBTITwo" :model="condition" :rules="rule">
      <el-row>
        <el-col :span="4">
          <el-form-item label="姓名" prop="name">
            <el-input placeholder="请输入内容" v-model="condition.name" clearable></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="工号" prop="number">
            <el-input placeholder="请输入内容" v-model="condition.number" clearable></el-input>
          </el-form-item>
        </el-col>
        <!-- </el-row> -->

        <!-- <el-row> -->
        <el-col :span="4">
          <el-form-item label="部门" prop="department">
            <el-input placeholder="请输入内容" v-model="condition.department" clearable></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="岗位" prop="job">
            <el-input placeholder="请输入内容" v-model="condition.job" clearable></el-input>
          </el-form-item>
        </el-col>
        <!-- </el-row> -->

        <!-- <el-row> -->
        <el-col :span="4">
          <el-form-item label="日期" prop="dateTime">
            <el-date-picker
              v-model="condition.dateTime"
              type="datetime"
              placeholder="选择日期时间"
              align="right"
              :picker-options="pickerOptions"
            ></el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <!-- 问卷内容 -->
      <!-- ITEM1 -->
      <el-row>
        <el-col :span="22" :offset="1">1．电话铃响的时候，你会：</el-col>
      </el-row>
      <el-form-item label=" " prop="item1">
        <el-radio v-model="condition.item1" label="A">a.第一时间跑过去接电话</el-radio>
        <el-radio v-model="condition.item1" label="B">b.希望别人去接</el-radio>
      </el-form-item>
      <!-- ITEM2 -->
      <el-row>
        <el-col :span="22" :offset="1">2．以下哪项描述更贴近你：</el-col>
      </el-row>
      <el-form-item label=" " prop="item2">
        <el-radio v-model="condition.item2" label="A">a.观察力敏锐而常常忽视自省</el-radio>
        <el-radio v-model="condition.item2" label="B">b.时常自省而不敏锐</el-radio>
      </el-form-item>
      <!-- ITEM3 -->
      <el-row>
        <el-col :span="22" :offset="1">3．在你看来以下哪种情况更糟糕：</el-col>
      </el-row>
      <el-form-item label=" " prop="item3">
        <el-radio v-model="condition.item3" label="A">a.过于关注想法和观念而忽略了事实</el-radio>
        <el-radio v-model="condition.item3" label="B">b.墨守成规</el-radio>
      </el-form-item>
      <!-- ITEM4 -->
      <el-row>
        <el-col :span="22" :offset="1">4．和人相处时，你通常：</el-col>
      </el-row>
      <el-form-item label=" " prop="item4">
        <el-radio v-model="condition.item4" label="A">a.坚定而不随和</el-radio>
        <el-radio v-model="condition.item4" label="B">b.随和而不坚定</el-radio>
      </el-form-item>
      <!-- ITEM5 -->
      <el-row>
        <el-col :span="22" :offset="1">5．以下那种情况会让你感到更舒适：</el-col>
      </el-row>
      <el-form-item label=" " prop="item5">
        <el-radio v-model="condition.item5" label="A">a.做出关键且必不可少的判断</el-radio>
        <el-radio v-model="condition.item5" label="B">b.做出有价值的判断</el-radio>
      </el-form-item>
      <!-- ITEM6 -->
      <el-row>
        <el-col :span="22" :offset="1">6. 面对工作环境里的喧闹和混乱，你会：</el-col>
      </el-row>
      <el-form-item label=" " prop="item6">
        <el-radio v-model="condition.item6" label="A">a.花时间平息喧闹和混乱</el-radio>
        <el-radio v-model="condition.item6" label="B">b.泰然处之</el-radio>
      </el-form-item>
      <!-- ITEM7 -->
      <el-row>
        <el-col :span="22" :offset="1">7．你的做事方式：</el-col>
      </el-row>
      <el-form-item label=" " prop="item7">
        <el-radio v-model="condition.item7" label="A">a.迅速做出决定</el-radio>
        <el-radio v-model="condition.item7" label="B">b.审时度势，斟酌良久而后决定</el-radio>
      </el-form-item>
      <!-- ITEM8 -->
      <el-row>
        <el-col :span="22" :offset="1">8．排队时，你常常：</el-col>
      </el-row>
      <el-form-item label=" " prop="item8">
        <el-radio v-model="condition.item8" label="A">a.与他人聊天</el-radio>
        <el-radio v-model="condition.item8" label="B">b.思考事情</el-radio>
      </el-form-item>
      <!-- ITEM9 -->
      <el-row>
        <el-col :span="22" :offset="1">9．你更倾向于：</el-col>
      </el-row>
      <el-form-item label=" " prop="item9">
        <el-radio v-model="condition.item9" label="A">a.感知能力强于构思能力</el-radio>
        <el-radio v-model="condition.item9" label="B">b.构思能力强于感知能力</el-radio>
      </el-form-item>
      <!-- ITEM10 -->
      <el-row>
        <el-col :span="22" :offset="1">10．你对什么更感兴趣：</el-col>
      </el-row>
      <el-form-item label=" " prop="item10">
        <el-radio v-model="condition.item10" label="A">a.真实而存在的东西</el-radio>
        <el-radio v-model="condition.item10" label="B">b.可能发生或潜在的东西</el-radio>
      </el-form-item>
      <!-- ITEM11 -->
      <el-row>
        <el-col :span="22" :offset="1">11．你更有可能会依赖什么来做决定：</el-col>
      </el-row>
      <el-form-item label=" " prop="item11">
        <el-radio v-model="condition.item11" label="A">a.数据、资料</el-radio>
        <el-radio v-model="condition.item11" label="B">b.愿望、要求</el-radio>
      </el-form-item>
      <!-- ITEM12 -->
      <el-row>
        <el-col :span="22" :offset="1">12．评价他人时，你易于：</el-col>
      </el-row>
      <el-form-item label=" " prop="item12">
        <el-radio v-model="condition.item12" label="A">a.客观，不带个人感情色彩</el-radio>
        <el-radio v-model="condition.item12" label="B">b.友好，有人情味</el-radio>
      </el-form-item>
      <!-- ITEM13 -->
      <el-row>
        <el-col :span="22" :offset="1">13．你希望通过什么方式制定合同：</el-col>
      </el-row>
      <el-form-item label=" " prop="item13">
        <el-radio v-model="condition.item13" label="A">a.签字，盖章，发送</el-radio>
        <el-radio v-model="condition.item13" label="B">b.握手达成契约</el-radio>
      </el-form-item>
      <!-- ITEM14 -->
      <el-row>
        <el-col :span="22" :offset="1">14．以下情况更能让你感到满足：</el-col>
      </el-row>
      <el-form-item label=" " prop="item14">
        <el-radio v-model="condition.item14" label="A">a.已完成的工作成果</el-radio>
        <el-radio v-model="condition.item14" label="B">b.不断取得进展的工作过程</el-radio>
      </el-form-item>
      <!-- ITEM15 -->
      <el-row>
        <el-col :span="22" :offset="1">15．在一个聚会上，你倾向于：</el-col>
      </el-row>
      <el-form-item label=" " prop="item15">
        <el-radio v-model="condition.item15" label="A">a.与许多人甚至陌生人交流</el-radio>
        <el-radio v-model="condition.item15" label="B">b.只与几个朋友交流</el-radio>
      </el-form-item>
      <!-- ITEM16 -->
      <el-row>
        <el-col :span="22" :offset="1">16．你更倾向于：</el-col>
      </el-row>
      <el-form-item label=" " prop="item16">
        <el-radio v-model="condition.item16" label="A">a.实干重于探讨</el-radio>
        <el-radio v-model="condition.item16" label="B">b.探讨重于实干</el-radio>
      </el-form-item>
      <!-- ITEM17 -->
      <el-row>
        <el-col :span="22" :offset="1">17．你喜欢什么样的作者：</el-col>
      </el-row>
      <el-form-item label=" " prop="item17">
        <el-radio v-model="condition.item17" label="A">a.语言直白直述主题</el-radio>
        <el-radio v-model="condition.item17" label="B">b.运用隐喻和象征等修辞手法</el-radio>
      </el-form-item>
      <!-- ITEM18 -->
      <el-row>
        <el-col :span="22" :offset="1">18．什么更吸引你：</el-col>
      </el-row>
      <el-form-item label=" " prop="item18">
        <el-radio v-model="condition.item18" label="A">a.连贯一致的思想</el-radio>
        <el-radio v-model="condition.item18" label="B">b.和谐融洽的关系</el-radio>
      </el-form-item>
      <!-- ITEM19 -->
      <el-row>
        <el-col :span="22" :offset="1">19．如果一定要使某人失望，你通常：</el-col>
      </el-row>
      <el-form-item label=" " prop="item19">
        <el-radio v-model="condition.item19" label="A">a.坦率、直言不讳</el-radio>
        <el-radio v-model="condition.item19" label="B">b.很友善，照顾感受</el-radio>
      </el-form-item>
      <!-- ITEM20 -->
      <el-row>
        <el-col :span="22" :offset="1">20．工作中，你希望自己的各项工作：</el-col>
      </el-row>
      <el-form-item label=" " prop="item20">
        <el-radio v-model="condition.item20" label="A">a.按部就班</el-radio>
        <el-radio v-model="condition.item20" label="B">b.没有计划限定</el-radio>
      </el-form-item>
      <!-- ITEM21 -->
      <el-row>
        <el-col :span="22" :offset="1">21．你通常更喜欢：</el-col>
      </el-row>
      <el-form-item label=" " prop="item21">
        <el-radio v-model="condition.item21" label="A">a.不能变更的总结陈词</el-radio>
        <el-radio v-model="condition.item21" label="B">b.试探性的开篇致辞</el-radio>
      </el-form-item>
      <!-- ITEM22 -->
      <el-row>
        <el-col :span="22" :offset="1">22．与陌生人交流会让你：</el-col>
      </el-row>
      <el-form-item label=" " prop="item22">
        <el-radio v-model="condition.item22" label="A">a.精力充沛，充满活力</el-radio>
        <el-radio v-model="condition.item22" label="B">b.显得更加保守，内敛</el-radio>
      </el-form-item>
      <!-- ITEM23 -->
      <el-row>
        <el-col :span="22" :offset="1">23．你认为事实：</el-col>
      </el-row>
      <el-form-item label=" " prop="item23">
        <el-radio v-model="condition.item23" label="A">a.能够说明一切</el-radio>
        <el-radio v-model="condition.item23" label="B">b.能够阐明各项原则原理</el-radio>
      </el-form-item>
      <!-- ITEM24 -->
      <el-row>
        <el-col :span="22" :offset="1">24．你觉得幻想家和理论家：</el-col>
      </el-row>
      <el-form-item label=" " prop="item24">
        <el-radio v-model="condition.item24" label="A">a.有些讨厌</el-radio>
        <el-radio v-model="condition.item24" label="B">b.非常有魅力</el-radio>
      </el-form-item>
      <!-- ITEM25 -->
      <el-row>
        <el-col :span="22" :offset="1">25．在一场热烈的辩论中，你会：</el-col>
      </el-row>
      <el-form-item label=" " prop="item25">
        <el-radio v-model="condition.item25" label="A">a.坚持你的观点</el-radio>
        <el-radio v-model="condition.item25" label="B">b.寻找共同之处</el-radio>
      </el-form-item>
      <!-- ITEM26 -->
      <el-row>
        <el-col :span="22" :offset="1">26．你更倾向于：</el-col>
      </el-row>
      <el-form-item label=" " prop="item26">
        <el-radio v-model="condition.item26" label="A">a.公正</el-radio>
        <el-radio v-model="condition.item26" label="B">b.宽容</el-radio>
      </el-form-item>
      <!-- ITEM27 -->
      <el-row>
        <el-col :span="22" :offset="1">27．你觉得工作中什么更自然：</el-col>
      </el-row>
      <el-form-item label=" " prop="item27">
        <el-radio v-model="condition.item27" label="A">a.指出错误</el-radio>
        <el-radio v-model="condition.item27" label="B">b.保持鼓励</el-radio>
      </el-form-item>
      <!-- ITEM28 -->
      <el-row>
        <el-col :span="22" :offset="1">28．什么时候的你感觉更舒服：</el-col>
      </el-row>
      <el-form-item label=" " prop="item28">
        <el-radio v-model="condition.item28" label="A">a.做出决定之后</el-radio>
        <el-radio v-model="condition.item28" label="B">b.做出决定之前</el-radio>
      </el-form-item>
      <!-- ITEM29 -->
      <el-row>
        <el-col :span="22" :offset="1">29．你倾向于：</el-col>
      </el-row>
      <el-form-item label=" " prop="item29">
        <el-radio v-model="condition.item29" label="A">a.坦率地说出你的想法</el-radio>
        <el-radio v-model="condition.item29" label="B">b.时刻聆听他人述说</el-radio>
      </el-form-item>
      <!-- ITEM30 -->
      <el-row>
        <el-col :span="22" :offset="1">30．你认为常识：</el-col>
      </el-row>
      <el-form-item label=" " prop="item30">
        <el-radio v-model="condition.item30" label="A">a.通常都是可靠的</el-radio>
        <el-radio v-model="condition.item30" label="B">b.往往值得怀疑</el-radio>
      </el-form-item>
      <!-- ITEM31 -->
      <el-row>
        <el-col :span="22" :offset="1">31．你认为孩子们通常都不会：</el-col>
      </el-row>
      <el-form-item label=" " prop="item31">
        <el-radio v-model="condition.item31" label="A">a.做十分有用的事</el-radio>
        <el-radio v-model="condition.item31" label="B">b.充分利用自己想象力</el-radio>
      </el-form-item>
      <!-- ITEM32 -->
      <el-row>
        <el-col :span="22" :offset="1">32．管理他人时，你更倾向于：</el-col>
      </el-row>
      <el-form-item label=" " prop="item32">
        <el-radio v-model="condition.item32" label="A">a.坚定而严格</el-radio>
        <el-radio v-model="condition.item32" label="B">b.宽容而随和</el-radio>
      </el-form-item>
      <!-- ITEM33 -->
      <el-row>
        <el-col :span="22" :offset="1">33．你更倾向于作为一个：</el-col>
      </el-row>
      <el-form-item label=" " prop="item33">
        <el-radio v-model="condition.item33" label="A">a.头脑冷静的人</el-radio>
        <el-radio v-model="condition.item33" label="B">b.热心肠的人</el-radio>
      </el-form-item>
      <!-- ITEM34 -->
      <el-row>
        <el-col :span="22" :offset="1">34．你倾向于：</el-col>
      </el-row>
      <el-form-item label=" " prop="item34">
        <el-radio v-model="condition.item34" label="A">a.紧扣一点，使其成为定论</el-radio>
        <el-radio v-model="condition.item34" label="B">b.探究事物的各种潜质和可能性</el-radio>
      </el-form-item>
      <!-- ITEM35 -->
      <el-row>
        <el-col :span="22" :offset="1">35．在多数情况下，你都会表现得：</el-col>
      </el-row>
      <el-form-item label=" " prop="item35">
        <el-radio v-model="condition.item35" label="A">a.从容谨慎，不会听从自发的冲动</el-radio>
        <el-radio v-model="condition.item35" label="B">b.自然坦率，而不会思前想后、权衡再三</el-radio>
      </el-form-item>
      <!-- ITEM36 -->
      <el-row>
        <el-col :span="22" :offset="1">36．你认为自己是一个：</el-col>
      </el-row>
      <el-form-item label=" " prop="item36">
        <el-radio v-model="condition.item36" label="A">a.外向开朗的人</el-radio>
        <el-radio v-model="condition.item36" label="B">b.内向缄默的人</el-radio>
      </el-form-item>
      <!-- ITEM37 -->
      <el-row>
        <el-col :span="22" :offset="1">37．你通常都会表现是一个：</el-col>
      </el-row>
      <el-form-item label=" " prop="item37">
        <el-radio v-model="condition.item37" label="A">a.讲求实际的人</el-radio>
        <el-radio v-model="condition.item37" label="B">b.沉于幻想的人</el-radio>
      </el-form-item>
      <!-- ITEM38 -->
      <el-row>
        <el-col :span="22" :offset="1">38．你说话时：</el-col>
      </el-row>
      <el-form-item label=" " prop="item38">
        <el-radio v-model="condition.item38" label="A">a.注重细节和详情多于注重普遍性和一般性</el-radio>
        <el-radio v-model="condition.item38" label="B">b.重视普遍性和一般性</el-radio>
      </el-form-item>
      <!-- ITEM39 -->
      <el-row>
        <el-col :span="22" :offset="1">39．哪句话更像是赞美：</el-col>
      </el-row>
      <el-form-item label=" " prop="item39">
        <el-radio v-model="condition.item39" label="A">a.“这是一个逻辑推理强、思维严谨的人”</el-radio>
        <el-radio v-model="condition.item39" label="B">b.“这是一个情感丰富的人”</el-radio>
      </el-form-item>
      <!-- ITEM40 -->
      <el-row>
        <el-col :span="22" :offset="1">40．你更易受什么支配：</el-col>
      </el-row>
      <el-form-item label=" " prop="item40">
        <el-radio v-model="condition.item40" label="A">a.你的思想</el-radio>
        <el-radio v-model="condition.item40" label="B">b.你的情感</el-radio>
      </el-form-item>
      <!-- ITEM41 -->
      <el-row>
        <el-col :span="22" :offset="1">41．当一件工作完成时，你喜欢：</el-col>
      </el-row>
      <el-form-item label=" " prop="item41">
        <el-radio v-model="condition.item41" label="A">a.进一步完成与之相关的所有细节工作</el-radio>
        <el-radio v-model="condition.item41" label="B">b.转向其他工作</el-radio>
      </el-form-item>
      <!-- ITEM42 -->
      <el-row>
        <el-col :span="22" :offset="1">42．你喜欢什么样的工作：</el-col>
      </el-row>
      <el-form-item label=" " prop="item42">
        <el-radio v-model="condition.item42" label="A">a.有最后期限</el-radio>
        <el-radio v-model="condition.item42" label="B">b.没有期限</el-radio>
      </el-form-item>
      <!-- ITEM43 -->
      <el-row>
        <el-col :span="22" :offset="1">43．你是哪种人：</el-col>
      </el-row>
      <el-form-item label=" " prop="item43">
        <el-radio v-model="condition.item43" label="A">a.很健谈的人</el-radio>
        <el-radio v-model="condition.item43" label="B">b.善于聆听的人</el-radio>
      </el-form-item>
      <!-- ITEM44 -->
      <el-row>
        <el-col :span="22" :offset="1">44．你更容易接受：</el-col>
      </el-row>
      <el-form-item label=" " prop="item44">
        <el-radio v-model="condition.item44" label="A">a.直白，表意明确的话语</el-radio>
        <el-radio v-model="condition.item44" label="B">b.隐晦，富有寓意的话语</el-radio>
      </el-form-item>
      <!-- ITEM45 -->
      <el-row>
        <el-col :span="22" :offset="1">45．你更经常注意：</el-col>
      </el-row>
      <el-form-item label=" " prop="item45">
        <el-radio v-model="condition.item45" label="A">a.恰好在眼前的事物</el-radio>
        <el-radio v-model="condition.item45" label="B">b.想象中的事物</el-radio>
      </el-form-item>
      <!-- ITEM46 -->
      <el-row>
        <el-col :span="22" :offset="1">46．成为哪一种人更糟糕：</el-col>
      </el-row>
      <el-form-item label=" " prop="item46">
        <el-radio v-model="condition.item46" label="A">a.软弱没骨气的人</el-radio>
        <el-radio v-model="condition.item46" label="B">b.固执倔强的人</el-radio>
      </el-form-item>
      <!-- ITEM47 -->
      <el-row>
        <el-col :span="22" :offset="1">47．在令人难堪的情况下，你有时表现得：</el-col>
      </el-row>
      <el-form-item label=" " prop="item47">
        <el-radio v-model="condition.item47" label="A">a.过于无动于衷</el-radio>
        <el-radio v-model="condition.item47" label="B">b.过于同情怜悯</el-radio>
      </el-form-item>
      <!-- ITEM48 -->
      <el-row>
        <el-col :span="22" :offset="1">48．你在做出选择时倾向于：</el-col>
      </el-row>
      <el-form-item label=" " prop="item48">
        <el-radio v-model="condition.item48" label="A">a.小心翼翼</el-radio>
        <el-radio v-model="condition.item48" label="B">b.有些冲动</el-radio>
      </el-form-item>
      <!-- ITEM49 -->
      <el-row>
        <el-col :span="22" :offset="1">49．你更喜欢：</el-col>
      </el-row>
      <el-form-item label=" " prop="item49">
        <el-radio v-model="condition.item49" label="A">a.紧张迅速而非悠闲懒散</el-radio>
        <el-radio v-model="condition.item49" label="B">b.从容不迫而非匆忙不迭</el-radio>
      </el-form-item>
      <!-- ITEM50 -->
      <el-row>
        <el-col :span="22" :offset="1">50．工作中的你倾向于：</el-col>
      </el-row>
      <el-form-item label=" " prop="item50">
        <el-radio v-model="condition.item50" label="A">a.好交际，能够与同事愉快地相处</el-radio>
        <el-radio v-model="condition.item50" label="B">b.保留更多的私人空间</el-radio>
      </el-form-item>
      <!-- ITEM51 -->
      <el-row>
        <el-col :span="22" :offset="1">51．你更容易相信：</el-col>
      </el-row>
      <el-form-item label=" " prop="item51">
        <el-radio v-model="condition.item51" label="A">a.你的经验</el-radio>
        <el-radio v-model="condition.item51" label="B">b.你的观念</el-radio>
      </el-form-item>
      <!-- ITEM52 -->
      <el-row>
        <el-col :span="22" :offset="1">52．对待某件事情时，你更倾向于：</el-col>
      </el-row>
      <el-form-item label=" " prop="item52">
        <el-radio v-model="condition.item52" label="A">a.实事求是</el-radio>
        <el-radio v-model="condition.item52" label="B">b.有些偏离实际情况</el-radio>
      </el-form-item>
      <!-- ITEM53 -->
      <el-row>
        <el-col :span="22" :offset="1">53．你认为自己是一个：</el-col>
      </el-row>
      <el-form-item label=" " prop="item53">
        <el-radio v-model="condition.item53" label="A">a.意志坚强、不屈不挠的人</el-radio>
        <el-radio v-model="condition.item53" label="B">b.心地温和、软心肠的人</el-radio>
      </el-form-item>
      <!-- ITEM54 -->
      <el-row>
        <el-col :span="22" :offset="1">54．你对自己哪种品格评价较高：</el-col>
      </el-row>
      <el-form-item label=" " prop="item54">
        <el-radio v-model="condition.item54" label="A">a.正确理性</el-radio>
        <el-radio v-model="condition.item54" label="B">b.忠诚努力</el-radio>
      </el-form-item>
      <!-- ITEM55 -->
      <el-row>
        <el-col :span="22" :offset="1">55．你通常希望事情：</el-col>
      </el-row>
      <el-form-item label=" " prop="item55">
        <el-radio v-model="condition.item55" label="A">a.已经安排妥当，做出决策</el-radio>
        <el-radio v-model="condition.item55" label="B">b.处于暂定的状态</el-radio>
      </el-form-item>
      <!-- ITEM56 -->
      <el-row>
        <el-col :span="22" :offset="1">56．你认为自己更加：</el-col>
      </el-row>
      <el-form-item label=" " prop="item56">
        <el-radio v-model="condition.item56" label="A">a.严肃、坚定</el-radio>
        <el-radio v-model="condition.item56" label="B">b.随和</el-radio>
      </el-form-item>
      <!-- ITEM57 -->
      <el-row>
        <el-col :span="22" :offset="1">57．你觉得自己是个：</el-col>
      </el-row>
      <el-form-item label=" " prop="item57">
        <el-radio v-model="condition.item57" label="A">a.善于谈话的人</el-radio>
        <el-radio v-model="condition.item57" label="B">b.善于聆听的人</el-radio>
      </el-form-item>
      <!-- ITEM58 -->
      <el-row>
        <el-col :span="22" :offset="1">58．你很珍视自己的何种能力：</el-col>
      </el-row>
      <el-form-item label=" " prop="item58">
        <el-radio v-model="condition.item58" label="A">a.有力地把握现实</el-radio>
        <el-radio v-model="condition.item58" label="B">b.有丰富的想象力</el-radio>
      </el-form-item>
      <!-- ITEM59 -->
      <el-row>
        <el-col :span="22" :offset="1">59．你更注重：</el-col>
      </el-row>
      <el-form-item label=" " prop="item59">
        <el-radio v-model="condition.item59" label="A">a.基本事实</el-radio>
        <el-radio v-model="condition.item59" label="B">b.潜在含义</el-radio>
      </el-form-item>
      <!-- ITEM60 -->
      <el-row>
        <el-col :span="22" :offset="1">60．什么错误看起来比较严重：</el-col>
      </el-row>
      <el-form-item label=" " prop="item60">
        <el-radio v-model="condition.item60" label="A">a.同情心过于丰富</el-radio>
        <el-radio v-model="condition.item60" label="B">b.过于冷漠</el-radio>
      </el-form-item>
      <!-- ITEM61 -->
      <el-row>
        <el-col :span="22" :offset="1">61．你更容易受什么影响：</el-col>
      </el-row>
      <el-form-item label=" " prop="item61">
        <el-radio v-model="condition.item61" label="A">a.有说服力的证据</el-radio>
        <el-radio v-model="condition.item61" label="B">b.令人感动的恳求</el-radio>
      </el-form-item>
      <!-- ITEM62 -->
      <el-row>
        <el-col :span="22" :offset="1">62．哪一种情况下你的感觉更好：</el-col>
      </el-row>
      <el-form-item label=" " prop="item62">
        <el-radio v-model="condition.item62" label="A">a.一件事情或工作即将结束</el-radio>
        <el-radio v-model="condition.item62" label="B">b.保留更多的选择</el-radio>
      </el-form-item>
      <!-- ITEM63 -->
      <el-row>
        <el-col :span="22" :offset="1">63．较令人满意的是：</el-col>
      </el-row>
      <el-form-item label=" " prop="item63">
        <el-radio v-model="condition.item63" label="A">a.确定事情已经做好</el-radio>
        <el-radio v-model="condition.item63" label="B">b.放任事情顺其自然</el-radio>
      </el-form-item>
      <!-- ITEM64 -->
      <el-row>
        <el-col :span="22" :offset="1">64．你是一个：</el-col>
      </el-row>
      <el-form-item label=" " prop="item64">
        <el-radio v-model="condition.item64" label="A">a.易于接近</el-radio>
        <el-radio v-model="condition.item64" label="B">b.略有些保守、腼腆</el-radio>
      </el-form-item>
      <!-- ITEM65 -->
      <el-row>
        <el-col :span="22" :offset="1">65．你喜欢什么样的故事：</el-col>
      </el-row>
      <el-form-item label=" " prop="item65">
        <el-radio v-model="condition.item65" label="A">a.刺激的冒险故事</el-radio>
        <el-radio v-model="condition.item65" label="B">b.幻想的英雄故事</el-radio>
      </el-form-item>
      <!-- ITEM66 -->
      <el-row>
        <el-col :span="22" :offset="1">66．什么事对你来说更容易：</el-col>
      </el-row>
      <el-form-item label=" " prop="item66">
        <el-radio v-model="condition.item66" label="A">a.使他人各尽其用</el-radio>
        <el-radio v-model="condition.item66" label="B">b.认同他人</el-radio>
      </el-form-item>
      <!-- ITEM67 -->
      <el-row>
        <el-col :span="22" :offset="1">67．你更希望自己具备：</el-col>
      </el-row>
      <el-form-item label=" " prop="item67">
        <el-radio v-model="condition.item67" label="A">a.意志的力量</el-radio>
        <el-radio v-model="condition.item67" label="B">b.情感的力量</el-radio>
      </el-form-item>
      <!-- ITEM68 -->
      <el-row>
        <el-col :span="22" :offset="1">68．你认为自己基本上：</el-col>
      </el-row>
      <el-form-item label=" " prop="item68">
        <el-radio v-model="condition.item68" label="A">a.禁得住批评和侮辱</el-radio>
        <el-radio v-model="condition.item68" label="B">b.禁不住批评和侮辱</el-radio>
      </el-form-item>
      <!-- ITEM69 -->
      <el-row>
        <el-col :span="22" :offset="1">69．你更容易注意到的是：</el-col>
      </el-row>
      <el-form-item label=" " prop="item69">
        <el-radio v-model="condition.item69" label="A">a.混乱</el-radio>
        <el-radio v-model="condition.item69" label="B">b.变革的机会</el-radio>
      </el-form-item>
      <!-- ITEM70 -->
      <el-row>
        <el-col :span="22" :offset="1">70．你更喜欢：</el-col>
      </el-row>
      <el-form-item label=" " prop="item70">
        <el-radio v-model="condition.item70" label="A">a.让一切有惯例或规则可循，讨厌反复无常</el-radio>
        <el-radio v-model="condition.item70" label="B">b.不喜欢惯例或常规</el-radio>
      </el-form-item>
      <el-row>
        <el-col :span="8" :offset="10">
          <el-button type="primary" @click="submit('MBTITwo')">提交</el-button>
        </el-col>
      </el-row>
    </el-form>
    <br />
    <br />
    <br />
  </div>
</template>
<script>
// import { valid } from "semver";
import { saveMBITTwo } from "../api/MBIT.js";
export default {
  data() {
    return {
      pickerOptions: {
        shortcuts: [
          {
            text: "今天",
            onClick(picker) {
              picker.$emit("pick", new Date());
            }
          },
          {
            text: "昨天",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24);
              picker.$emit("pick", date);
            }
          },
          {
            text: "一周前",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", date);
            }
          }
        ]
      },
      condition: {
        name: null,
        number: null,
        department: null,
        job: null,
        dateTime: null,
        item1: null,
        item2: null,
        item3: null,
        item4: null,
        item5: null,
        item6: null,
        item7: null,
        item8: null,
        item9: null,
        item10: null,
        item11: null,
        item12: null,
        item13: null,
        item14: null,
        item15: null,
        item16: null,
        item17: null,
        item18: null,
        item19: null,
        item20: null,
        item21: null,
        item22: null,
        item23: null,
        item24: null,
        item25: null,
        item26: null,
        item27: null,
        item28: null,
        item29: null,
        item30: null,
        item31: null,
        item32: null,
        item33: null,
        item34: null,
        item35: null,
        item36: null,
        item37: null,
        item38: null,
        item39: null,
        item40: null,
        item41: null,
        item42: null,
        item43: null,
        item44: null,
        item45: null,
        item46: null,
        item47: null,
        item48: null,
        item49: null,
        item50: null,
        item51: null,
        item52: null,
        item53: null,
        item54: null,
        item55: null,
        item56: null,
        item57: null,
        item58: null,
        item59: null,
        item60: null,
        item61: null,
        item62: null,
        item63: null,
        item64: null,
        item65: null,
        item66: null,
        item67: null,
        item68: null,
        item69: null,
        item70: null,
        _dateTime: null
      },
      rule: {
        name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
        number: [{ required: true, message: "请输入工号", trigger: "blur" }],
        department: [
          { required: true, message: "请输入部门", trigger: "blur" }
        ],
        job: [{ required: true, message: "请输入岗位", trigger: "blur" }],
        dateTime: [{ required: true, message: "请选择日期", trigger: "blur" }],
        item1: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item2: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item3: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item4: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item5: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item6: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item7: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item8: [{ required: true, message: "请进行选择", trigger: "blur" }],

        item9: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item10: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item11: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item12: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item13: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item14: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item15: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item16: [{ required: true, message: "请进行选择", trigger: "blur" }],

        item17: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item18: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item19: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item20: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item21: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item22: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item23: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item24: [{ required: true, message: "请进行选择", trigger: "blur" }],

        item25: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item26: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item27: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item28: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item29: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item30: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item31: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item32: [{ required: true, message: "请进行选择", trigger: "blur" }],

        item33: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item34: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item35: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item36: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item37: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item38: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item39: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item40: [{ required: true, message: "请进行选择", trigger: "blur" }],

        item41: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item42: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item43: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item44: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item45: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item46: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item47: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item48: [{ required: true, message: "请进行选择", trigger: "blur" }],

        item49: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item50: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item51: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item52: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item53: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item54: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item55: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item56: [{ required: true, message: "请进行选择", trigger: "blur" }],

        item57: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item58: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item59: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item60: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item61: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item62: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item63: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item64: [{ required: true, message: "请进行选择", trigger: "blur" }],

        item65: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item66: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item67: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item68: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item69: [{ required: true, message: "请进行选择", trigger: "blur" }],
        item70: [{ required: true, message: "请进行选择", trigger: "blur" }]
      },
      instance: null,
      Score: [],
      Escore: 0,
      Iscore: 0,
      Sscore: 0,
      Nscore: 0,
      Tscore: 0,
      Fscore: 0,
      Jscore: 0,
      Pscore: 0,
      FFScore: ""
    };
  },
  methods: {
    submit(forName) {
      this.Score = [];
      this.Escore = this.Iscore = this.Sscore = this.Nscore = this.Tscore = this.Fscore = this.Jscore = this.Pscore = 0;
      this.FFScore = "";
      this.$refs[forName].validate(valid => {
        if (valid) {
          // 转存数组
          for (let i in this.condition) {
            this.Score.push(this.condition[i]);
          }
          this.Score.splice(0, 5);
          // 计算E、I类型得分
          for (let index = 0; index < this.Score.length - 1; index += 7) {
            if (this.Score[index] == "A") {
              this.Escore += 1;
            }
            if (this.Score[index] == "B") {
              this.Iscore += 1;
            }
          }
          console.log(this.Iscore, this.Escore);
          // 计算S、N类型得分
          for (let index = 1; index < this.Score.length - 1; index += 7) {
            if (this.Score[index] === "A") {
              this.Sscore += 1;
            }
            if (this.Score[index] === "B") {
              this.Nscore += 1;
            }
          }
          for (let index = 2; index < this.Score.length - 1; index += 7) {
            if (this.Score[index] === "A") {
              this.Sscore += 1;
            }
            if (this.Score[index] === "B") {
              this.Nscore += 1;
            }
          }
          // 计算T、F类型得分
          for (let index = 3; index < this.Score.length - 1; index += 7) {
            if (this.Score[index] === "A") {
              this.Tscore += 1;
            }
            if (this.Score[index] === "B") {
              this.Fscore += 1;
            }
          }
          for (let index = 4; index < this.Score.length - 1; index += 7) {
            if (this.Score[index] === "A") {
              this.Tscore += 1;
            }
            if (this.Score[index] === "B") {
              this.Fscore += 1;
            }
          }
          // 计算J、P类型得分
          for (let index = 5; index < this.Score.length - 1; index += 7) {
            if (this.Score[index] === "A") {
              this.Jscore += 1;
            }
            if (this.Score[index] === "B") {
              this.Pscore += 1;
            }
          }
          for (let index = 6; index < this.Score.length - 1; index += 7) {
            if (this.Score[index] === "A") {
              this.Jscore += 1;
            }
            if (this.Score[index] === "B") {
              this.Pscore += 1;
            }
          }

          if (this.Escore == this.Iscore) {
            this.$alert(
              "请重新确认1、8、15、22、29、36、43、50、57、64题答案",
              "消息提示",
              {
                confirmButtonText: "确定",
                callback: action => {
                  // 清除答案
                  this.condition.item1 = this.condition.item8 = this.condition.item15 = this.condition.item22 = this.condition.item29 = this.condition.item36 = this.condition.item43 = this.condition.item50 = this.condition.item57 = this.condition.item64 = null;
                }
              }
            );
          }
          if (this.Sscore === this.Nscore) {
            this.$alert(
              "请重新确认2、3、9、10、16、17、24、25、30、31、37、38、44、45、51、52、58、59、65、66题答案",
              "消息提示",
              {
                confirmButtonText: "确定",
                callback: action => {
                  // 清除答案
                  this.condition.item2 = this.condition.item3 = this.condition.item10 = this.condition.item9 = this.condition.item16 = this.condition.item17 = this.condition.item24 = this.condition.item25 = this.condition.item30 = this.condition.item31 = this.condition.item37 = this.condition.item38 = this.condition.item44 = this.condition.item45 = this.condition.item51 = this.condition.item52 = this.condition.item58 = this.condition.item59 = this.condition.item65 = this.condition.item66 = null;
                }
              }
            );
          }
          if (this.Tscore === this.Fscore) {
            this.$alert(
              "请重新确认4、5、11、12、18、19、25、26、32、33、39、40、46、47、53、54、60、61、67、68题答案",
              "消息提示",
              {
                confirmButtonText: "确定",
                callback: action => {
                  // 清除答案
                  this.condition.item4 = this.condition.item5 = this.condition.item11 = this.condition.item12 = this.condition.item18 = this.condition.item19 = this.condition.item25 = this.condition.item26 = this.condition.item32 = this.condition.item33 = this.condition.item39 = this.condition.item40 = this.condition.item46 = this.condition.item47 = this.condition.item53 = this.condition.item54 = this.condition.item60 = this.condition.item61 = this.condition.item67 = this.condition.item68 = null;
                }
              }
            );
          }
          if (this.Jscore === this.Pscore) {
            this.$alert(
              "请重新确认6、7、13、14、20、21、27、28、34、35、41、42、48、49、55、56、62、63、69、70题答案",
              "消息提示",
              {
                confirmButtonText: "确定",
                callback: action => {
                  // 清除答案
                  this.condition.item6 = this.condition.item7 = this.condition.item13 = this.condition.item14 = this.condition.item20 = this.condition.item21 = this.condition.item27 = this.condition.item28 = this.condition.item34 = this.condition.item35 = this.condition.item41 = this.condition.item42 = this.condition.item48 = this.condition.item49 = this.condition.item55 = this.condition.item56 = this.condition.item62 = this.condition.item63 = this.condition.item69 = this.condition.item70 = null;
                }
              }
            );
          }

          // 统计最后得分
          if (this.Escore >= this.Iscore) {
            this.FFScore = "E";
          } else {
            this.FFScore = "I";
          }
          if (this.Sscore >= this.Nscore) {
            this.FFScore = this.FFScore + "S";
          } else {
            this.FFScore = this.FSFcore + "N";
          }
          if (this.Tscore >= this.Fscore) {
            this.FFScore = this.FFScore + "T";
          } else {
            this.FFScore = this.FFScore + "F";
          }
          if (this.Jscore >= this.Pscore) {
            this.FFScore = this.FFScore + "J";
          } else {
            this.FFScore = this.FFScore + "P";
          }
          // 将分数保存至数据库;
          if (
            this.Escore !== this.Iscore &&
            this.Sscore !== this.Nscore &&
            this.Tscore !== this.Fscore &&
            this.Jscore !== this.Pscore
          ) {
            saveMBITTwo(this.condition, this.FFScore).then(res => {
              this.loading = false;
              if (res) {
                this.$alert("您的测试结果为" + this.FFScore, "测试结果", {
                  confirmButtonText: "确定",
                  callback: action => {
                    // this.$message({
                    //   type: "info",
                    //   message: `action: ${action}`
                    // });
                  }
                });
              } else {
                // console.log(res);
              }
            });
          }
        }
      });
    }
  },
  mounted() {
    this.instance = this.$notify({
      title: "提示",
      message:
        "从a和b中选择一个答案。之后，系统会按照计分规则进行统计。本问卷上的所有答案都无对错之分，因为无论你选择那一项，地球上总有一半的人会赞同你的选择。",
      duration: 0
    });
  },
  beforeDestroy() {
    this.instance.close();
  }
};
</script>
<style>
.titleClass {
  width: auto;
  text-align: center;
}
</style>